package org.hcf.data.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 好友申请表
 * </p>
 *
 * @author xianiyitiao
 * @since 2024-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ChatApply对象", description="好友申请表")
public class ChatApply extends Model<ChatApply> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "apply_id", type = IdType.AUTO)
    private Long applyId;

    @ApiModelProperty(value = "发起id")
    private Long fromId;

    @ApiModelProperty(value = "接收id")
    private Long toId;

    @ApiModelProperty(value = "群id,仅邀请入群需要")
    private Long groupId;

    @ApiModelProperty(value = "申请类型0好友1群组")
    private byte applyType;

    @ApiModelProperty(value = "申请状态0无1同意2拒绝3忽略")
    private byte applyStatus;

    @ApiModelProperty(value = "申请来源")
    private byte applySource;

    @ApiModelProperty(value = "申请人给对方取得别称")
    private String remark;

    @ApiModelProperty(value = "理由")
    private String reason;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "申请时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "玩家是否已接收")
    private boolean receive;


    @Override
    protected Serializable pkVal() {
        return this.applyId;
    }

}
